
//
//  DidMainRectView.m
//  didihaha
//
//  Created by zzp on 2017/8/22.
//  Copyright © 2017年 zhaozhongpeng. All rights reserved.
//

#import "DidMainRectView.h"
#import "Masonry.h"

@implementation DidMainRectView

- (instancetype)init{
    if (self = [super init]) {
        [self createUI];
    }
    return self;
}

- (void)createUI{
    [self addSubview:self.RectImageView];
    [self addSubview:self.RectLabel];
    
    [self.RectImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self);
        make.width.height.mas_equalTo(40);
    }];
    
    [self.RectLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.RectImageView.mas_bottom).offset(10);
        make.left.right.equalTo(self);
    }];
}


#pragma mark - 懒加载
- (UIImageView *)RectImageView{
    if (_RectImageView == nil) {
        _RectImageView = [[UIImageView alloc] init];
        _RectImageView.layer.cornerRadius = 20;
        _RectImageView.clipsToBounds = YES;
    }
    return _RectImageView;
}

- (UILabel *)RectLabel{
    if (_RectLabel == nil) {
        _RectLabel = [[UILabel alloc] init];
        _RectLabel.font  = [UIFont systemFontOfSize:11];
        _RectLabel.textColor = [UIColor colorWithRed:133/255.0 green:133/255.0 blue:133/255.0 alpha:1];
    }
    return _RectLabel;
}



@end
